<template>
    <view class="strategy">
        <view class="strategy_jianding" wx:for="{{JdList}}" wx:key="{{item}}" wx:if="{{item.showable === 1}}">
            <view class="strategy_img"><image src="{{item.image}}"></image></view>
            <view class="strategy_shuoming">
                <view>{{item.title}}</view>
                <view>
                    {{item.content}}
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import wepy from 'wepy';
    import api from '@/api/api';
    import {
        USER_INFO, USER_SPECICAL_INFO
    } from '@/utils/constant';

    export default class strategy extends wepy.page {
        config = {  // 配置当前页面

            navigationBarTitleText: '鉴定攻略'    // 头部标题
        };
        components = {};

        data = {
            JdList:[]
        };

        async getJDList() {
            let self = this;
            api.getContentConfigInfo({
                query: {}
            },"IDENTIFY").then(function(res){
                if (res.data.code == 0) {
                    // self.JdList = res.data.data;
                    self.JdList = [
                        {
                          content: "拍摄出清晰的字样",
                          createTime: "2018-07-20T01:27:17.804Z",
                          id: "513598",
                          image: "http://gatherabc.oss-cn-qingdao.aliyuncs.com/0b49f18bfe2839211bef04694ccfd931.jpg",
                          showable: 0,
                          title: "球鞋外观",
                          type: "IDENTIFY",
                          updateTime: "2018-07-20T01:27:17.804Z"
                        },
                        {
                          content: "拍摄出清晰的样式",
                          createTime: "2018-07-20T01:27:17.804Z",
                          id: "513748",
                          image: "http://gatherabc.oss-cn-qingdao.aliyuncs.com/0b49f18bfe2839211bef04694ccfd931.jpg",
                          showable: 1,
                          title: "球鞋指标",
                          type: "IDENTIFY",
                          updateTime: "2018-07-20T01:27:17.804Z"
                        },
                        {
                          content: "拍摄出清晰的标志",
                          createTime: "2018-07-20T01:27:17.804Z",
                          id: "513008",
                          image: "http://gatherabc.oss-cn-qingdao.aliyuncs.com/0b49f18bfe2839211bef04694ccfd931.jpg",
                          showable: 1,
                          title: "中底走线",
                          type: "IDENTIFY",
                          updateTime: "2018-07-20T01:27:17.804Z"
                        }
                    ];
                    self.$apply();
                } else {
                    tip.error(res.data.msg)
                }
            })
        }

        onLoad(){
            this.getJDList()
        }

        methods = {  // 方法
            loginByWX(){
                wepy.navigateTo({
                    url: '/pages/common/addressAddPage'
                })
            }
        };
        events = {};
    }

</script>
<style lang="less">
    .strategy {
        >view:first-child{
            margin-top: 0rpx !important;
        }
        >view{
            margin-top: 20rpx;
        }
        .strategy_jianding{
            background: #fff;
            .strategy_img{
                width: 100%;
                height: 300rpx;
                image{
                    width: 100%;
                    height: 100%;
                }
            }
            .strategy_shuoming{
                padding: 40rpx;
                view:first-child{
                    color: #666;
                    border-bottom: 1px solid #ddd;
                    padding-bottom:20rpx;
                }
                view:last-child{
                    padding-top:20rpx;
                    color: #a0a0a0;
                }
            }

        }
    }
</style>
